/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.fty.service;

import java.util.List;

import com.jeesite.common.lang.DateUtils;
import com.jeesite.modules.fty.entity.FtySelContract;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.fty.entity.FtyLeaseContractSmart;
import com.jeesite.modules.fty.dao.FtyLeaseContractSmartDao;

/**
 * 合同表Service
 * @author 租凭合同简单版本
 * @version 2018-04-23
 */
@Service
@Transactional(readOnly=true)
public class FtyLeaseContractSmartService extends CrudService<FtyLeaseContractSmartDao, FtyLeaseContractSmart> {

	public void addDataScopeFilter(FtyLeaseContractSmart ftyLeaseContractSmart, String ctrlPermi) {

		ftyLeaseContractSmart.getSqlMap().getDataScope().addFilter("dsfOffice", "Office", "e.office_code", ctrlPermi);

	}
	/**
	 * 获取单条数据
	 * @param ftyLeaseContractSmart
	 * @return
	 */
	@Override
	public FtyLeaseContractSmart get(FtyLeaseContractSmart ftyLeaseContractSmart) {
		return super.get(ftyLeaseContractSmart);
	}
	
	/**
	 * 查询分页数据
	 * @param page 分页对象
	 * @param ftyLeaseContractSmart
	 * @return
	 */
	@Override
	public Page<FtyLeaseContractSmart> findPage(Page<FtyLeaseContractSmart> page, FtyLeaseContractSmart ftyLeaseContractSmart) {
		return super.findPage(page, ftyLeaseContractSmart);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param ftyLeaseContractSmart
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(FtyLeaseContractSmart ftyLeaseContractSmart) {
		super.save(ftyLeaseContractSmart);
	}
	
	/**
	 * 更新状态
	 * @param ftyLeaseContractSmart
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(FtyLeaseContractSmart ftyLeaseContractSmart) {
		super.updateStatus(ftyLeaseContractSmart);
	}
	
	/**
	 * 删除数据
	 * @param ftyLeaseContractSmart
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(FtyLeaseContractSmart ftyLeaseContractSmart) {
		super.delete(ftyLeaseContractSmart);
	}

	@Transactional(readOnly=false)
	public void generalUUid(FtyLeaseContractSmart ftyLeaseContractSmart) {

		dao.generalcn(ftyLeaseContractSmart);
	}
}